<?php

namespace App\Repositories\Admin;

use App\BaseRepository;

class UserRepository extends BaseRepository
{
    //模型名称
    protected $modelName = 'App\User';

    protected $allowApiMethod = ['index','show'];

    protected function query()
    {
        return $this->model()->whereRaw('(id<>3 or (userType<>"admin" and userType is not null))');
    }

    protected function getShowRespondData($model)
    {
        return $model->load('dealer');
    }
}
